import request from '../utils/request'

export function getAllGoods() {
  return request({
    url: '/api/goods/getALlGoods',
    method: 'get'
  })
}

export function addGoods(data) {
  return request({
    url: '/api/goods/AddGoods',
    method: 'post',
    data
  })
}

export function updateGoods(data) {
  return request({
    url: '/api/goods/UpdateGoods',
    method: 'post',
    data
  })
}

export function deleteGoods(id) {
  return request({
    url: '/api/goods/DelGoods',
    method: 'post',
    data: { id }
  })
}